package com.expressage.service.impl;

import com.expressage.dao.SiteDao;
import com.expressage.po.Site;
import com.expressage.service.SiteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Array;
import java.util.List;
@Service
public class SiteServiceImpl implements SiteService {
    @Autowired
    SiteDao siteDao;
    @Override
    public List<Site> findAll() {
        return siteDao.findAll();
    }

    @Override
    public Site findByid(int siteid) {
       return siteDao.findByid(siteid);
    }

    @Override
    public List<Site> findByStreetId(int id) {
        return siteDao.findByStreetId(id);
    }

    @Override
    public boolean add(Site site) {
        return siteDao.add(site)>0?true:false;
    }

    @Override
    public boolean delete(int[] array) {
        return siteDao.delete(array)>0?true:false;
    }


}
